package com.isatechindonesia.isatracker;

import android.content.Intent;
import android.os.Bundle;
import android.preference.PreferenceActivity;
import android.preference.PreferenceManager;
import android.view.KeyEvent;

public class SettingActivity extends PreferenceActivity {
	
	@SuppressWarnings("deprecation")
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		
		PreferenceManager prefMgr = getPreferenceManager();
        prefMgr.setSharedPreferencesName("gpsconfig");
        prefMgr.setSharedPreferencesMode(MODE_PRIVATE);
		
		addPreferencesFromResource(R.layout.activity_setting);        
		
	}
	
	@Override
    public boolean onKeyDown(int keyCode, KeyEvent event) {
        if ((keyCode == KeyEvent.KEYCODE_BACK)) {             
        	        	
	        startActivity(new Intent(SettingActivity.this, MainActivity.class));
	        finish(); 
        	        		        	                    	
        }
        return super.onKeyDown(keyCode, event);
    }    
	
}
